#ifndef __IMA_JSON_ASSEMBLER_H__
#define __IMA_JSON_ASSEMBLER_H__

#include <string>
#include <jansson.h>
#include <vector>

using namespace std;

typedef struct info_recipient {
	unsigned long recipientId;
	std::string strName;
	std::string strEmailId;
	std::string strPhone;
	std::string strAddress;
	std::string strRelationship;
} INFO_RECIPIENT;

class ImaJsonAssembler {
	public:
		ImaJsonAssembler() {}

		~ImaJsonAssembler(){}

		char* assembleUserFeedbackPkt(std::string& strSource,
					std::string& strSenderName,
					std::string& strSenderEmailId,
					std::string& strFeedbackSub,
					std::string& strFeedbackMsg);
		char* assembleUserRegistrationPkt(string& source,
					string& emailId, string& password,
					string& name, string& gender, string& address,
					string& city, string& state, string& country,
					string& zip, string& phone, string& dob,
					string& imId, string& imService);
		char* assembleRegistrationConfirmationPkt(string& source,
					string& emailId);
		char* assembleUpdateUserDetailsPkt(string& strSource,
					string& strEmailId, string& strImId, string& strName,
					string& strAddress, string& strCity,
					string& strState, string& strCountry, string& strZip, 
					string& strPhone, string& strGender, string& strDob);
		char* assembleChangePasswordPkt(const std::string& source, 
					const std::string& strEmailId,
					const std::string& currPassword, const std::string& newPassword);
		char* assembleForgotPasswordPkt(const std::string& source, 
					const std::string& strEmailId);
		char* assembleLoginPkt(string& source, string& emailId, string& password,
					const std::string& strConfCode);
		char* assembleLogoutPkt(string& source, string& emailId);
		char* assembleFetchUserDataPkt(std::string& source, std::string& emailId);
		char* assembleAddInfoPkt(const std::string& strSource, 
					const std::string& strEmailId, const std::string& strInfo, 
					const int media, const std::string& strExpiryDate, 
					const unsigned int ttl);
		char* assembleUpdateInfoPkt(const std::string& strSource, 
					const std::string& strEmailId, long& infoId, 
					const std::string& strInfo, const int media, 
					const std::string& strExpiryDate, const unsigned int ttl);
		char* assembleUpdateInfoPkt(const std::string& strSource, 
					const std::string& strEmailId, long& infoId, 
					const std::string& strInfo, const int media, 
					const std::string& strExpiryDate, const unsigned int ttl,
					std::vector<unsigned long>& recipientsToDisassociate);
		char* assembleDeleteInfoPkt(const std::string& strSource,
					const std::string strEmailId, unsigned long infoId);
		char* assembleAddInfoRecipientsPkt(const std::string& strSource,
					const std::string& strEmailId, const unsigned long& infoId,
					std::vector<INFO_RECIPIENT*>& recipientVector);
		char* assembleDeleteInfoRecipientPkt(const std::string& strSource,
					const std::string& strEmailId, const unsigned long& infoId,
					const unsigned long& recipientId);
		char* assembleAddRecipientPkt(const std::string& strSource,
					const std::string& strEmailId, const std::string& strRecipientName,
					const std::string& strRecipeientEmailId, const std::string& strRecipientPhone,
					const std::string& strRecipeintAddress, const std::string& strRecipientRelation);
		char* assembleUpdateRecipientPkt(const std::string& strSource,
					const std::string& strEmailId, const long& recipientId,
					const std::string& strRecipientName,
					const std::string& strRecipeientEmailId, const std::string& strRecipientPhone,
					const std::string& strRecipeintAddress, const std::string& strRecipientRelation);
		char* assembleDeleteRecipientPkt(const std::string& strSource,
					const std::string& strEmailId, const long& recipientId);
};

#endif //__IMA_JSON_ASSEMBLER_H__

